"""
得到被pass的数据并且对这些数据再次进行获取
"""
import re

from day04.work01 import BQGClient

with open(r'bqg_logs/pass.txt','r',encoding='utf-8') as f:
    client = BQGClient()
    # print(f.read())
    pass_data = f.readlines()
    r_l=[]
    for i in pass_data:
        book_id, page = tuple(re.findall(r', (\d+)',i))
        print(book_id,page)
        r_l.append(int(page))
    print(book_id,r_l)
    client.download(60417,'道诡异仙',r_l)